﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShenCengCYSQSJ.aspx.cs" Inherits="Web.Pages.QuShui.ShuiLiPC.ShenCengCYSQSJ" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../../../JS/jquery.js"></script>
    <script src="../../../JS/AddEditCancel.js"></script>
    <script type="text/javascript">
        function begincall() {
            loadpanel1.Show();
        }
        function endcall() {
            loadpanel1.Hide();
            //定位添加或修改的记录
            var oid = hdCollection.Get("OperateID");
            var index = -1;
            if (oid != -1 && typeof (oid) != undefined) {
                for (var i = 0; i < gvList.GetVisibleRowsOnPage() ; i++) {
                    if (gvList.GetRowKey(i) == oid) {
                        index = i;
                    }
                }
                if (index != -1) {
                    gvList.SetFocusedRowIndex(index);
                    gvList.MakeRowVisible(index);
                    hdCollection.Set("OperateID", -1);
                }
            }
        }

        //编辑
        function BianJi(id) {
            openCenter("/Pages/QuShui/ShuiLiPC/QuShuiJXX.aspx?cz=1&bh=" + id, "820px", "1000px");
        }

        //详细
        function XiangXi(id) {
            openCenter("/Pages/QuShui/ShuiLiPC/QuShuiJXX.aspx?cz=2&bh=" + id, "820px", "1000px");
        }

        //查看历史数据
        //$(function () {
        //    var bh = $("#ck").attr('bh');
        //    $("#ck").attr('href', 'http://31.16.1.32:8080/szy/DispatchAction.do?efFormEname=PCSL02X3&table=PG02X&code=' + bh);
        //});
        //function LiShi(bh) {
        //    alert(bh);
        //    $("#ck").attr('href', 'http://31.16.1.32:8080/szy/DispatchAction.do?efFormEname=PCGS8013&table=P801&code='+bh);
        //}
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
          深层承压水取水井
        </div>
      <%--  <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxLoadingPanel ID="ASPxLoadingPanel1" ClientInstanceName="loadpanel1" runat="server" ContainerElementID="gvList" Modal="true" Theme="Metropolis" ShowImage="false" Text="加载中"></dx:ASPxLoadingPanel>
       --%> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <table style="width: 100%; margin: auto; float: left;">
                        <tr>
                            <td align="left" style="width: 100px">机电井名称：
                            </td>
                            <td align="left" style="width: 120px">
                                <dx:ASPxTextBox ID="txtMC" ClientInstanceName="txtMC" runat="server"  Width="90%">
                                </dx:ASPxTextBox>
                            </td>
                            <td align="left" style="width: 100px">水资源区名称：
                            </td>
                            <td align="left" style="width: 120px">
                                <dx:ASPxTextBox ID="txtMC2" ClientInstanceName="txtMC2" runat="server" Width="90%">
                                </dx:ASPxTextBox>
                            </td>
                            <td align="left" style="width: 80px">行政区划：
                            </td>
                            <td align="left" style="width: 100px">
                                <dx:ASPxComboBox ID="cmbXZQ" runat="server" Width="90%" AutoPostBack="true" >
                                </dx:ASPxComboBox>
                            </td>
                            <td>
                                <dx:ASPxLoadingPanel runat="server" ID="LoadPanel11" ClientInstanceName="LoadPanel" Text="查询"></dx:ASPxLoadingPanel>
                                <dx:ASPxButton ID="btnSearch" runat="server" Text="查询" onclick="btnSearch_Click">
                                     <ClientSideEvents  Click="function(s,e){LoadPanel.Show();}"/>
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxLabel runat="server" ID="lbcount" ForeColor="Blue"></dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                    <div id="divList">
                        <dx:ASPxGridView ID="gvList" ClientInstanceName="gvList" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%">
                            <Columns>
                                <dx:GridViewDataTextColumn FieldName="ID" Caption="序号" Width="5%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_XIAN" Caption="县（区、市、旗）" Width="10%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_SHANGBAODW" Caption="上报单位" Width="10%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_MINGCHENG" Caption="名称" Width="15%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_BIANHAO" Caption="编码" Width="15%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_JUTIWZ" Caption="具体位置" Width="25%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Width="15px">
                                    <DataItemTemplate>
                                        <a href="#" onclick="BianJi(<%#Eval("ID")%>)">编辑</a>
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Width="15px">
                                    <DataItemTemplate>
                                        <a href="#" onclick="XiangXi(<%#Eval("ID")%>)">详细</a>
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Width="20px">
                                    <DataItemTemplate>
                                        <a id="ck" target="_blank" href="http://31.16.1.32:8080/szy/DispatchAction.do?efFormEname=PCGS8013&table=P801&code=<%#Eval("S_BIANHAO")%>" >查看历史</a>
                                       
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                            </Columns>
                            <ClientSideEvents Init="function(s,e){AdjustSize(120,gvList);}" BeginCallback="function(s,e){begincall();}" EndCallback="function(s,e){endcall();}" />
                        </dx:ASPxGridView>
                    </div>
                    <div>
                        
                        <table style="height:40px;">
                            <tr>
                                <td align="right" style="width: 120px">水利普查其他页面：</td>
                                <td><a target="_blank" href="http://192.168.1.10/gssj/index.php?s=/index/index.html">http://192.168.1.10/gssj/index.php?s=/index/index.html</a></td>
                            </tr>
                        </table>
                    </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
